import type { App } from 'vue'
import { hasRole } from './permit/hasRole'
import { hasPermit } from './permit/hasPermit'

/**
 * 导出指令：v-xxx
 * @methods hasRole 用户权限，用法: v-hasRole
 * @methods hasPermit 按钮权限，用法: v-hasPermit
 */
export const setupAuth = (app: App<Element>) => {
  hasRole(app)
  hasPermit(app)
}
